package com.project.springboot.goodcode.standardbuilder;

/**
 * description: 实体构建者类
 * @author 朱正磊
 * @date 2024-09-19 13:20:29
 */
public class MacComputerBuilder1 extends ComputerBuilder1 {

    private final Computer1 computer;

    public MacComputerBuilder1(String cpu, String ram) {
        computer = new Computer1(cpu, ram);
    }

    @Override
    public void setUsbCount() {
        computer.setUsbCount(2);
    }

    @Override
    public void setKeyboard() {
        computer.setKeyboard("罗技键盘");
    }

    @Override
    public void setDisplay() {
        computer.setDisplay("三星显示器");
    }

    @Override
    public Computer1 getComputer() {
        return computer;
    }

}
